package com.demo.io;

import java.io.FileInputStream;
import java.io.InputStreamReader;

/**
 * @author wangning
 * @date 2023/12/15 17:30
 * @description 获取文件本身的编码格式
 */
public class GetFileEncoding {
    public static void main(String[] args) throws Exception {
        InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream("E:\\my-project\\workspace\\java-demo\\io\\src\\main\\resources\\file\\test.txt"));
        System.out.println(inputStreamReader.getEncoding());
    }
}
